import request from '@/utils/request'

export function login (data) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

export function logout () {
  return request({
    url: '/api/logout',
    method: 'post'
  })
}

export function getList (data) {
  return request({
    url: '/api/user/list',
    method: 'get',
    params: data
  })
}
export function addUser (data) {
  return request({
    url: '/api/user/add',
    method: 'post',
    data
  })
}
export function findList (data) {
  return request({
    url: '/api/user/find',
    method: 'get',
    params: data
  })
}
export function delUser (id) {
  return request({
    url: `/api/user/delete/${id}`,
    method: 'get'
  })
}
export function updateUser (data) {
  return request({
    url: '/api/user/update',
    method: 'post',
    data
  })
}
